Page({
  data:{
    weeklyMovieList:[
    {
      name:"泰坦尼克号",
      comment:"失去的才是永恒的",
      imagePath:"/images/titanic.jpg",
      isHighlyRecommended:false,
      id:77
    },
    {
      name:"教父",
      comment:"最精彩的剧本，最真实的黑帮电影。",
      imagePath:"/images/jf.jpg",
      isHighlyRecommended:true,
      id:1291841
    },
    {
      name:"这个杀手不太冷",
      comment:"小萝莉与怪蜀黍的故事",
      imagePath:"/images/leon.jpg",
      isHighlyRecommended:false,
      id:99
    },
  ],
    count: 0,
    score: 61,
    currentIndex: 0
  },
  /*页面生命周期函数*/
  /*初始化加载*/
  onLoad:function(options){
    this.setData({
      currentIndex:this.data.weeklyMovieList.length -1
    })
  },
  /*页面每一次显示都要调用,*/
  onShow:function(){
  },
  
  /*初始渲染完成调用*/
  onReady:function(){},
  /*页面影藏的时候，需要调用*/
  onHide:function(){},

  onUnload:function(){},
  
  f0:function(event){
    this.setData({
      currentIndex:this.data.weeklyMovieList.length -1
    })
  },
  f1:function(event){
    var movieId=event.currentTarget.dataset.movieId
    event.currentTarget.dataset.movieId
    console.log(movieId);
    wx.navigateTo({
      url: '/pages/detail/detail?id='+movieId,
    })
  },

  onShareAppMessage:function(){
  return {
    title:"每周推荐"
  }
  }

})
